<style>
.fui-header a.back:before {
	content: " ";
	border-color: #fff;
}
.fui-cell-group .fui-cell:before {
	border-bottom: 0 solid #ebebeb;
}
</style>
<div class="fui-page order-create-page fui-page-current" ng-if="pagedata.op == 'detail'">
	<div class="fui-header" style="z-index:108;background-color:#18bc9c;position: fixed;">
				<div class="fui-header-left">
					<a class="back" style="color:#fff" href="javascript:" ng-click="goback()">返回上一页</a>
				</div>
				<div class="title bold" style="font-size:1rem;color:#fff"></div>
				<div class="fui-header-right" style="padding-right:0.5rem;color:#fff;">
						<div class="icon icon-ship r-f" style="font-size:1rem;padding-left:0.5rem" href="javascript:;" ng-click="pagedata.showcard=true;"></div>
				</div>
		</div>
	<div class="fui-content">
		<div class="fui-cell-group" style="width:100%;margin-top:0;z-index:108">
				<div class="fui-cell">
						<div class="fui-cell-text">{{pagedata.item.title}}</div>
						<div class="fui-cell-remark noremark" style="color:#999">一共{{pagedata.allnum}}道题</div>
				</div>
				<div class="jylabels jylabel-success-0 active" style="background-color:#fff;border-radius:0.2rem;padding: 0 0.5rem;margin-left:0.7rem;margin-top:-0.5rem;line-height:1.6">{{pagedata.item.name||'模拟考试'}}</div>
		</div>
		<div ng-if="false" class="weui_cells_title c bold">答卷介绍</div>
		<div ng-if="pagedata.item.desc && false" class="weui_cells_title c">{{pagedata.item.desc}}</div>
		<div ng-if="false" class="fixed-title" style="margin-top:0.5rem">
							 <span class="befirst spacing">
								 <span class="icon icon-fengexianzuo" style="font-size:2rem;color:#666"></span>
							 </span> 
							 <span class="title-text bold" style="color:#333;line-height:2rem">开始答题</span> 
							 <span class="spacing">
								 <span class="icon icon-fengexianyou" style="font-size:2rem;color:#666"></span>
							 </span>
		</div>
		<div style="padding:0 0.6rem" ng-include="sys_html('_ti_item')"></div>
		<div class="content-empty" ng-show="!pagedata.post.content || pagedata.post.content.length == 0 ">
		  <i class="icon jinyunicon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;font-size:2rem"></i><br/><p style="color: #999;font-size: .75rem">没有任何题目！</p>
		</div>
		<div ng-show="pagedata.post.content.length >0 && false" class="weui_btn_area">
			 <a class="weui_btn weui_btn_primary" href="javascript:"  ng-click="pagedata.checkpost=true">提交答卷</a>
		</div>
	</div>
</div>
<div ng-if="pagedata.checkpost" class="popup">
	<div class="popup-body">
		<div class="popup-center">
			<i class="closed icon icon-cuowu" ng-click="pagedata.checkpost=false"></i>
			<div class="weui_msg">
					<div class="weui_text_area">
						<p class="weui_msg_title">确认提交答卷？</p>
					</div>
					<div class="weui_icon_area">
						<i class="weui_icon_info weui_icon_msg"></i>
					</div>
					<div class="weui_text_area" style="padding-bottom:1rem">
						<p class="weui_msg_desc">提交答卷后，将不能再二次修改答案了！</p>
					</div>
					<div class="modal-footer">
						<div class="mod-fail" ng-click="pagedata.checkpost=false;">我再看看</div>
						<div class="mod-success" ng-click="pagedata.diyfrompost()">确认提交</div>
					</div>
			</div>
		</div>
		
	</div>
</div>
<div class="fui-navbar">
    <a href="javascript:;" ng-click="pagedata.onitem();" class="nav-item">
        <span class="label">上一题</span>
    </a>
	<a class="external nav-item">
        <span class="label"><span class="syscolor">{{pagedata.nowkey+1}}</span>/{{pagedata.allnum}}</span>
    </a>
	<a href="javascript:;" ng-click="pagedata.nextitem();" class="nav-item">
        <span class="label">{{pagedata.nowkey+1==pagedata.allnum?'提交答卷':'下一题'}}</span>
    </a>
</div>
<div ng-if="pagedata.showcard" class="popup">
	<div class="popup-body">
		<div class="popup-bottom">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showcard=false"></i>
			<div class="fixed-title" style="margin-top:0.5rem">
							 <span class="befirst spacing">
								 <span class="icon icon-fengexianzuo" style="font-size:2rem;color:#666"></span>
							 </span> 
							 <span class="title-text bold" style="color:#333;line-height:2rem">答题卡</span> 
							 <span class="spacing">
								 <span class="icon icon-fengexianyou" style="font-size:2rem;color:#666"></span>
							 </span>
			</div>
			<div class="fui-icon-group col-5" style="height:20rem;padding:0.5rem;overflow-y:scroll">
				<a class="fui-icon-col-sm external" ng-repeat="item in pagedata.post.content" style="padding:0 0.6rem" href="javascript:;" ng-click="pagedata.toitem($index)">
					<div class="text" style="width:2.5rem;height:2.5rem;line-height:2.5rem;padding:0;font-size:1rem;border:2px solid #333;border-radius: 2.5rem;">{{$index+1}}</div>
				</a>
			</div>
		</div>
	</div>
</div>
<div ng-if="pagedata.checkstart" class="popup">
	<div class="popup-body">
		<div class="popup-center">
			<div class="weui_msg">
					<div class="weui_text_area">
						<p class="weui_msg_title">确认要开始答题？</p>
					</div>
					<div ng-if="pagedata.pluginset.ischeck_da==1" class="fui-cell-group" style="margin-top:0">
						<div class="fui-cell must ">
							<div class="fui-cell-label">姓名</div>
							<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="设置姓名" ng-model="pagedata.post.name" /></div>
						</div>
						<div class="fui-cell must ">
							<div class="fui-cell-label ">手机号</div>
							<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="设置手机号" ng-model="pagedata.post.mobile" /></div>
						</div>
						<div class="fui-cell">
							<div class="fui-cell-label">出生日期</div>				
										<div class="fui-cell-label" style="width:28%">
											<select ng-model="pagedata.post.birth.year" class="form-control tpl-province">
											<option value="" selected="selected">年</option>
											<option ng-repeat="value in pagedata.years" value="{{value}}" ng-selected="pagedata.post.birth.year==value">{{value}}</option>
											</select>
										</div>
										<div class="fui-cell-label" style="width:28%">
											<select ng-model="pagedata.post.birth.month" class="form-control tpl-city">
											<option value="" selected="selected">月</option>
											<option ng-repeat="value in pagedata.months" value="{{value}}" ng-selected="pagedata.post.birth.month==value">{{value}}</option>
											</select>
										</div>
										<div class="fui-cell-label" style="width:28%">
											<select ng-model="pagedata.post.birth.day" class="form-control tpl-district">
											<option value="" selected="selected">日</option>
											<option ng-repeat="value in pagedata.days" ng-show="showday(pagedata.post.birth.year,pagedata.post.birth.month,value)" value="{{value}}" ng-selected="pagedata.post.birth.day==value">{{value}}</option>
											</select>
										</div>
							
						</div>
					</div>
					<div class="weui_text_area" style="padding-bottom:1rem">
						<p class="weui_msg_desc">确认要开始答题？点击确定后，将开始计时！！</p>
					</div>
					<div class="modal-footer">
						<div class="mod-fail" ng-click="goback('','jy_lineks/ti_index//id='+pagedata.post.datiid);">我再看看</div>
						<div class="mod-success" ng-click="pagedata.checkstart=false;pagedata.tostarttime()">确认开始</div>
					</div>
			</div>
		</div>
		
	</div>
</div>
<script type="text/javascript">
if(scope.pagedata.post.starttime<=0){
	scope.pagedata.checkstart=true
}
scope.pagedata.tostarttime=function(nowkey){
	scope.post_json('/detail/starttime/',scope.pagedata.post,function(res){			
	});
}
scope.pagedata.toitem=function(nowkey){
	scope.pagedata.nowitem=scope.pagedata.post.content[nowkey];
	scope.pagedata.showcard=false
	scope.$evalAsync();
}
//获取关注
scope.pagedata.setlike=function(){
	scope.post_json('/lianxi/like/',scope.pagedata.nowitem,function(res){
		scope.message(res);
	});
}
scope.pagedata.diyfrompost=function(){
	scope.post_json('/detail/post/',scope.pagedata.post,function(){
		
	});
}
</script>
